﻿using System;
using System.Collections.Generic;
using System.IO;
using NUnit.Framework;
using Swd05.SH.Interfaces;

namespace Swd05.SH
{
	[TestFixture(Description = "Testsuite für die FileFactory")]
	public class FileFactoryFixture
	{
		private IScriptFactory factory = null;

		#region Properties
		private IScriptFactory Factory
		{
			get
			{
				return this.factory;
			}
		}
		#endregion
		#region methods
		[TestFixtureSetUp]
		public void TestFixtureSetUp()
		{
			this.factory = Facade.Instance.Create(Bll.Source.File, Path.GetTempPath() );
		}
		[TestFixtureTearDown]
		public void TestFixtureTearDown()
		{
		}
		[SetUp]
		public void TestSetup()
		{
		}
		[TearDown]
		public void TestTearDown()
		{
		}
		[Test]
		public void FindNonExistingScriptById()
		{
			FactoryTester ft = new FactoryTester(this.Factory);
			ft.FindNonExistingScript();
		}
		[Test]
		public void FindExistingScriptById()
		{
			FactoryTester ft = new FactoryTester(this.Factory);
			ft.FindExistingScriptById();
		}
		[Test]
		public void RemoveScriptContent()
		{
			FactoryTester ft = new FactoryTester(this.Factory);
			ft.RemoveScriptContent();
		}
		[Test]
		public void RetrieveScriptContent()
		{
			FactoryTester ft = new FactoryTester(this.Factory);
			ft.RetrieveScriptContent();
		}
		[Test]
		public void UpdateScriptContent()
		{
			FactoryTester ft = new FactoryTester(this.Factory);
			ft.RetrieveScriptContent();
		}
		[Test]
		public void LoadAllScripts()
		{
			FactoryTester ft = new FactoryTester(this.Factory);
			ft.Load();
		}
		#endregion
	}
}
